#!/bin/bash

APP_NAME="51proxy"
APP_ROOT="/usr/local/51proxy"
APP_PATH="${APP_ROOT}/${APP_NAME}"

restartApp()
{
    echo "restart ${APP_ROOT}/sbin/51proxy"
    ${APP_ROOT}/sbin/51proxy
}

PID=`pidof -o $$ -o $PPID -o %PPID -x ${APP_NAME}`
if [ -z "${PID}" ];  then
    restartApp
fi

exit 0